package org.jeecg.controller;

import org.jeecg.domain.dto.ServeProviderDto;
import org.jeecg.service.ServeProviderService;
import org.jeecg.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/serveProvider")
public class ServeProviderController {
    @Autowired
    private ServeProviderService serveProviderService;

//    服务人员列表分页+模糊查询
    @GetMapping("/serveProviderList")
    public ResponseResult serveProviderList(ServeProviderDto serveProviderDto){
       return serveProviderService.serveProviderList(serveProviderDto);
    }

//    解冻
    @PostMapping("/jiedong")
    public ResponseResult jiedong(Long id){
       return serveProviderService.jiedong(id);
    }


//    冻结
    @PostMapping("/dongjie")
    public ResponseResult dongjie(Long id){
        return serveProviderService.dongjie(id);
    }

//    基本信息
    @PostMapping("/serveProviderInfo")
    public ResponseResult serveProviderInfo(Long id){
        return serveProviderService.serveProviderInfo(id);
    }
}
